package com.java.exer_2;

/**
 * @author luzhikun
 * @date 2020/12/15-21:36
 */
public class hourlyEmpoyee extends Employee {
    private int wage;
    private int hour;

    public hourlyEmpoyee(int wage, int hour) {
        this.wage = wage;
        this.hour = hour;
    }

    public hourlyEmpoyee(String name, int number, MyDate birthday, int wage, int hour) {
        super(name, number, birthday);
        this.wage = wage;
        this.hour = hour;
    }

    @Override
    public double earnings() {
        return wage * hour;
    }

    public String toString() {
        return super.toString();
    }
}